package creators;

import java.util.Scanner;

import simulation.Muscle;
import simulation.Model;

/**
 * creator for a Muscle object.
 * @author Schwartz & Roy
 *
 */
public class MuscleCreator extends SpringCreator {

    /**
     * creates the object.
     * @param model is the model
     * @param line is the input
     */
    @Override
    public void create(Model model, Scanner line) {
        double[] properties = setSpringCommonValues(line);
        double amplitude = line.nextDouble();
        model.add(new Muscle(model.getMass((int) properties[0]),
                model.getMass((int) properties[1]),
                properties[2], properties[3], amplitude));
    }
}
